<?php /* Smarty version 2.6.18, created on 2010-03-09 11:22:50
         compiled from user_details_popup.tpl */ ?>
<script type="text/javascript">	
	var calendar1 = new ekimo_calendar("c_show1","bdate1","Birth Date", "calendar1");
</script>
<form name="mainForm" method="POST" action="/admin/systemAddUser" enctype="multipart/form-data">
<h1>User Details</h1>
<div width="100%">
<div class="boxed">
	<table width="100%">
		<tr><td bgcolor="#cccccc" colspan="2"><h3><b>User Account</b></h3></td></tr>
		<tr>
			<td width="15%"><label>Username:</label>
				<input type="hidden" id="uid" name="uid" value="<?php echo $this->_tpl_vars['uid']; ?>
">
			</td>
			<td><input type="text" id="uname" name="uname" value="<?php echo $this->_tpl_vars['uname']; ?>
"></td>
		</tr>
		<tr>
			<td><label>New Password:</label></td>
			<td><input type="text" id="npassword" name="npassword" value="<?php echo $this->_tpl_vars['password']; ?>
"></td>
		</tr>
		<tr>
			<td><label>Assigned Country:</label></td>
			<td>
				<select id="country" name="country">
				<?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['country']):
?>
					<option value="<?php echo $this->_tpl_vars['country']['country_code']; ?>
"
					<?php if ($this->_tpl_vars['country']['country_code'] == $this->_tpl_vars['c_code']): ?>
						selected
					<?php endif; ?>
					><?php echo $this->_tpl_vars['country']['country']; ?>
</option>
				<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>User Group:</label></td>
			<td>
				<select id="ugroup" name="ugroup">
					<?php $_from = $this->_tpl_vars['ugroups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ugroup']):
?>
						<option value="<?php echo $this->_tpl_vars['ugroup']['user_group_code']; ?>
" 
						<?php if ($this->_tpl_vars['ugroup']['user_group_code'] == $this->_tpl_vars['ug_code']): ?>
							selected
						<?php endif; ?>
						><?php echo $this->_tpl_vars['ugroup']['name']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>User Type:</label></td>
			<td>
				<select id="utype" name="utype">
					<?php $_from = $this->_tpl_vars['types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype']):
?>
						<option value="<?php echo $this->_tpl_vars['utype']['id']; ?>
" 
						<?php if ($this->_tpl_vars['utype']['id'] == $this->_tpl_vars['ut_id']): ?>
							selected
						<?php endif; ?>
						><?php echo $this->_tpl_vars['utype']['value']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>Organization</label></td>
			<td>
				<select id="organization" name="organization">
					<option value=""> --- </option>
					<?php $_from = $this->_tpl_vars['orgs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['org']):
?>
						<option value="<?php echo $this->_tpl_vars['org']['id']; ?>
" 
						<?php if ($this->_tpl_vars['org']['id'] == $this->_tpl_vars['uorg']): ?>
							selected
						<?php endif; ?>
						><?php echo $this->_tpl_vars['org']['name']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>MAC ID:</label></td>
			<td><input type="text" id="macid" name="macid" value="<?php echo $this->_tpl_vars['macid']; ?>
"></td>
		</tr>
	</table>
</div>
<br><br>
<div class="boxed" width="100%">
	<table width="100%">
		<tr><td bgcolor="#cccccc" colspan="3"><h3><b>Account Details</b></h3></td></tr>
		<tr>
			<td width="15%"><label>Last Name:</label></td>
			<td><input type="text" id="lname" name="lname" value="<?php echo $this->_tpl_vars['lname']; ?>
"></td>
		</tr>
		<tr>
			<td><label>First Name:</label></td>
			<td><input type="text" id="fname" name="fname" value="<?php echo $this->_tpl_vars['fname']; ?>
"></td>
		</tr>
		<tr>
			<td><label>Middle Name:</label></td>
			<td><input type="text" id="mname" name="mname" value="<?php echo $this->_tpl_vars['mname']; ?>
"></td>
		</tr>
		<tr>
			<td><label>National ID:</label></td>
			<td><input type="text" id="nationalID" name="nationalID" value="<?php echo $this->_tpl_vars['nationalID']; ?>
"></td>
		</tr>
		<tr>
			<td><label>Photo:</label></td>
			<td>
				<?php if (! empty ( $this->_tpl_vars['photo'] )): ?>
				<img src="<?php echo $this->_tpl_vars['photo']; ?>
" hieght="100px" width="100px">
				<?php endif; ?>
				<br><input type="file" accept="image/jpeg" id="fupic" name="fupic">
			</td>
		</tr>
		<tr>
			<td><label>Gender:</label></td>
			<td>
				<label>Male
					<input type="radio" value="M" id="gender" name="gender"
					<?php if ($this->_tpl_vars['gender'] == 'M'): ?>
					checked
					<?php endif; ?>
					>
				</label>
				<label>Female
					<input type="radio" value="F" id="gender" name="gender"
					<?php if ($this->_tpl_vars['gender'] == 'F'): ?>
					checked
					<?php endif; ?>
					>
				</label>
			</td>
		</tr>
		<tr>
			<td><label>Date of Birth:</label></td>
			<td>
				<label for="bdate1" class="yui-skin-sam">
					<input type="text" id="bdate1" name="bdate1" value="<?php echo $this->_tpl_vars['bdate']; ?>
">
					<a href="javascript:void(0);" id="c_show1">
						<img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/>
					</a>
					<div id="calendar1" style="display:none;position:absolute"></div> 
				</label>
			</td>
		</tr>
		<tr>
			<td><label>Address:</label></td>
		</tr>
		<tr>
			<td>
				<label for="street">Street:</label>
			</td>
			<td>
					<input type="text" id="street" name="street" value="<?php echo $this->_tpl_vars['street']; ?>
">
			</td>
		<tr>
			<td>
				<label for="city">City:</label>
			</td>
			<td>
				<input type="text" id="city" name="city" value="<?php echo $this->_tpl_vars['city']; ?>
">
			</td>
		</tr>
		<tr>
			<td><label for="province">Province:</label></td>
			<td>
				<input type="text" id="province" name="province" value="<?php echo $this->_tpl_vars['province']; ?>
">
			</td>
		</tr>
		<tr>
			<td><label for="zip">Zip:</label></td>
			<td>
				<input type="text" id="zip" name="zip" value="<?php echo $this->_tpl_vars['zip']; ?>
">
			</td>
		</tr>
		<tr>
			<td><label>Contacts:</label></td>
		</tr>
		<tr>
			<td><label>Email:</label></td>
			<td>
				<input type="text" id="email" name="email" value="<?php echo $this->_tpl_vars['email']; ?>
">
			</td>
		</tr>
		<tr>
			<td><label for="phone">Phone:</label></td>
			<td>
				<input type="text" id="phone" name="phone" value="<?php echo $this->_tpl_vars['phone']; ?>
">
			</td>
		</tr>
		<tr>
			<td>
				<label for="fax">Fax:</label>
			</td>
			<td>
				<input type="text" id="fax" name="fax" value="<?php echo $this->_tpl_vars['fax']; ?>
">
			</td>
		</tr>
	</table>
</div>
<br><hr>
<input type="submit" value="Save">
<input type="button" value="Cancel" onclick="doajaxAction('/admin/systemUM',0,'main_content');">
</form>
</div>